package gui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;




/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Home extends javax.swing.JFrame {

	private static final long serialVersionUID = 1L;
	private JLabel lblTitle;
	private JButton cmdSalir;
	private JButton cmdProveedores;

	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Home inst = new Home();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public Home() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
			{
				lblTitle = new JLabel();
				getContentPane().add(lblTitle);
				lblTitle.setText("CPR - Home");
				lblTitle.setBounds(12, 12, 103, 32);
				lblTitle.setFont(new java.awt.Font("Calibri",0,20));
			}
			{
				cmdProveedores = new JButton();
				getContentPane().add(cmdProveedores);
				cmdProveedores.setText("Proveedores");
				cmdProveedores.setBounds(228, 91, 119, 31);
				cmdProveedores.setFont(new java.awt.Font("Calibri",0,16));
				cmdProveedores.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						cmdProveedoresActionPerformed(evt);
					}
				});
			}
			{
				cmdSalir = new JButton();
				getContentPane().add(cmdSalir);
				cmdSalir.setText("Salir");
				cmdSalir.setBounds(24, 319, 91, 31);
				cmdSalir.setFont(new java.awt.Font("Calibri",0,16));
				cmdSalir.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						cmdSalirActionPerformed(evt);
					}
				});
			}
			pack();
			setSize(600, 400);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void cmdSalirActionPerformed(ActionEvent evt) {
		System.exit(0);
	}
	
	private void cmdProveedoresActionPerformed(ActionEvent evt) {
		Proveedores inst = Proveedores.getInstance();
		inst.setVisible(true);
	}

}
